package com.accedo.achievements.dataaccess.dao;

import java.util.List;

import com.accedo.achievements.dataaccess.model.App;

/**
 * A DAO interface with application model database operations 
 * @author Bo Liang
 */
public interface AppDao {
	
	/**
	 * Get user's application serial number List by using user id.
	 * <p>by using user id, this function returns the application serial number 
	 * which applications that user has already download or bought, 
	 * system will create a connection in the many-to-many table about user and application's achievements,
	 * this function could return the application sn based on the achievements.
	 * @param user_id	user id
	 * @return			List of application serial number
	 */
	public List<String> getAppsnListByUseid(int user_id);
	
	/**
	 * Get application object by achievement sn.
	 * <p>obtain the application object instance by using this application serial number<br>
	 * @param app_sn	application serial number
	 * @return			application object
	 */
	public App getAppByAppsn(String app_sn);
	
	/**
	 * Get all applications from database.
	 * @return application objects List
	 */
	public List<App> getAppList();
}
